#ifndef QCONSTANTS_H
#define QCONSTANTS_H


#include <QtCore/QHash>
#include <QtCore/QString>


/**
 * This class maintains all constant values
 * It includes special characters.
 * It also includes chinese strings from resource file.
 * These strings can be retrieved by a hash-like interface.
 *
 * @author gonwan(gonwan@gmail.com)
 * @version 1.0
 */
class QConstants
{
public:
    /**
     * Special characters
     */
    enum SpecialCharacter
    {
        Esc   = 0x001b,
        Star  = 0x2605,
        Round = 0x2299,
        Colon = 0xff1a,
        Space = 0x3000,
    };
    /**
     * Constructor
     */
    QConstants();
    /**
     * This function retrieves a constant chinese string by a given key
     * @param key The key
     * @return The value
     */
    static QString value(/*in*/ const QString &key);

private:
    /**
     * This function initialize the class
     * All constant chinese string are loaded here.
     * @return true if success
     */
    static bool init();
    /** The data hash table */
    static QHash<QString, QString> m_stringHash;

};


#endif
